JAR_NAME=./sentinel-dashboard-1.8.2.jar
PORT=8849

if [ ! -e $JAR_NAME ]; then
    echo "$JAR_NAME not exists"
    exit 1
fi

# 启动Sentinel服务
nohup java  -server -Xms64m -Xmx256m  -Dserver.port=$PORT -Dcsp.sentinel.dashboard.server=localhost:$PORT -Dproject.name=sentinel-dashboard -jar $JAR_NAME &
# 等待Sentinel服务启动
sleep 5

echo "username/password: sentinel/sentinel"
open "http://127.0.0.1:$PORT"
